<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <title>{$appConfigs.title}</title>
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/{$page_theme | default: 'default'}/easyui.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/style/my.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/css/style.css">
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.easyui.min.js"></script>
    
    <script type="text/javascript" src="{$contextPath}/invest/javascript/my.js"></script>
	<script type="text/javascript" src="{$contextPath}/assets/highcharts/highcharts.js"></script>
	<script type="text/javascript" src="{$contextPath}/assets/highcharts/modules/exporting.js"></script>
	<script type="text/javascript" src="{$contextPath}/assets/highcharts/modules/export-data.js"></script>
</head>
<body style="display:inline-block; width:98%;">
	<div class="easyui-layout" style="width:100%;height:100%;">
	
		<div data-options="region:'center',split:true" style="width:75%;">
			<div id="container2" class="easyui-panel" title="成本市值分析" style="width:100%;height:100%;padding:2px;">
			</div>
		
		</div>
	</div>
	
	{literal}
	<script type="text/javascript">
	$.getJSON('/invest/SummaryMoneyDailyService/findCostAmountData.do?$value=rows', function(data){
		var categories = new Array();
		var series = new Array();
		var profits = new Array();
		var rates = new Array();
		var markets = new Array();
		var costs = new Array();
		
		for(var i=0; i< data.length; i ++) {
			categories[i] 	= data[data.length - 1 - i].sum_date.substring(0, 10);
			profits[i]		= parseInt(data[data.length - 1 - i].total_profit);
			markets[i]		= parseInt(data[data.length - 1 - i].total_amount);
			costs[i]		= parseInt(data[data.length - 1 - i].total_cost);
			//rates[i] 		= parseInt(data[data.length - 1 - i].totalProfit * 10000) / 100.0;
		}
		data = [{name:'成本', data:costs},{name:'市值', data:markets},{name:'利润', data:profits}]
		rendererAreaChart(categories, data, 'container2','成本市值报表','成本/市值/利润日报');
	});
	</script>
	{/literal}
</body>
</html>